package com.sinoatma.physignsmonitor.adapter



import android.annotation.SuppressLint
import android.view.View
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.clj.fastble.data.BleDevice
import com.common.frame.base.BaseAdapter
import com.common.frame.base.getColorInt
import com.sinoatma.physignsmonitor.MyApp
import com.sinoatma.physignsmonitor.R
import com.sinoatma.physignsmonitor.bean.BloodCollectListBean
import com.sinoatma.physignsmonitor.bean.BpDataBean
import com.sinoatma.physignsmonitor.bean.MonitorRecordEntity
import com.sinoatma.physignsmonitor.databinding.BpListLayoutBinding
import com.sinoatma.physignsmonitor.databinding.DeviceListLayoutBinding
import com.sinoatma.physignsmonitor.databinding.HistoryListLayoutBinding

@SuppressLint("MissingPermission")
class HistoryAdapter(data: MutableList<BloodCollectListBean>?) : BaseAdapter<BloodCollectListBean,HistoryListLayoutBinding>(R.layout.history_list_layout,data) {
    @SuppressLint("ResourceAsColor")
    override fun convert(holder: BaseDataBindingHolder<HistoryListLayoutBinding>, item: BloodCollectListBean) {
      holder.dataBinding?.run {
            tvHistoryCode.text=item.donorCode
            tvHistoryName.text=item.name
            tvHistorySex.text=item.sex
            tvHistoryWarning.text="${item.exceptionCount}"
            tvHistoryTime.text=item.startTime
            tvHistoryPath.text="查看详情"

      }
    }
}




